package com.jch.mp.manner1.server;

import com.jch.mp.manner1.codec.MsgDecoder;
import com.jch.mp.manner1.codec.MsgEncoder;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

public class Manner1ServerChannelInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ch.pipeline().addLast(new MsgDecoder());
        ch.pipeline().addLast(new MsgEncoder());

        ch.pipeline().addLast(new SimpleMessageHandler());
        ch.pipeline().addLast(new GroupMessageHandler());
        ch.pipeline().addLast(new ComplexMessageHandler());
    }
}
